;(function  ($) {
	var myObject = function  () {		
		
		var loadEvent = function  () {			
			
			$(document).ready(function  () {
				$(".item4,.site-nav").mousemove(function  () {
					$(".site-nav").removeClass("Hide");
					$(".item4").addClass("current");
				}).mouseout(function  () {
					$(".site-nav").addClass("Hide");
					$(".item4").removeClass("current");
				})				
			})
			
		
			$(".phone-qr").hover(function  () {
				$(".qr-code").css("display","block");
			});
				$(".phone-qr").mouseout(function  () {
				$(".qr-code").css("display","none");
			});
			
			
			$(document).ready(function  () {
				$(".J-branch").click(function  () {
					if($(".shop-branchs").is(":hidden")){
						$(".shop-branchs").removeClass("Hide");
					}else{
						$(".shop-branchs").addClass("Hide");
					}
				})
			})
			
			
			$(document).ready(function  () {
				$("#basic-info .J-unfold").click(function  () {
					if($(".other").is(":hidden")){
						$(".other").removeClass("Hide");
						$("#basic-info").removeClass("default");
						$(".cover").addClass("Hide");
						$(".fold1").removeClass("Hide");
						$(".unfold").addClass("Hide");						
					}else{
						$(".other").addClass("Hide");
						$("#basic-info").addClass("default");
						$(".cover").removeClass("Hide");
						$(".fold1").addClass("Hide");
						$(".unfold").removeClass("Hide");
					}
				})
			})
			
			
			$(document).ready(function  () {
				$(".action-more,.shop-action-more-list").mousemove(function  () {
					$(".action-more").addClass("active");
					$(".shop-action-more-list").removeClass("Hide");
				}).mouseout(function  () {
					$(".action-more").removeClass("active");
					$(".shop-action-more-list").addClass("Hide");
				})
			})

//这里有错误  单击只显示一次就消失了
			$(document).ready(function  () {
				$("#reservation").click(function  () {					
					$("#mbox_overlay").css("display","block");
					$("#bookingPop").css("display","block");							
				})
				$(".pop-main .J-reservewin .hd .close").click(function  () {
					$("#mbox_overlay").css("display","none");
					$("#bookingPop").css("display","none");
				})
			})
//			$(document).ready(function  () {
//				$("#reservation").click(function  () {					
//					
//														
//				})
//			})
			
			
//			$(document).ready(function(){
// 				$("#reservation").click(function(event){
//  				event.stopPropagation(); //停止事件冒泡
// 					$(".pop-win").toggle();
// 				});
// 					//点击空白处隐藏弹出层
//				$("body").click(function(event){
//  			var _con = $(".pop-main");  // 设置目标区域
//   				if(!_con.is(event.target) && _con.has(event.target).length ==0){ 
//    					$(".pop-win").hide();     //淡出消失
//   				}
//				});  
//			});
			
			$(document).ready(function  (e) {
				$("#sales .unfold").click(function  (e) {
					var shouqi = $(this).html();
					if(shouqi=="更多4单团购∨"){
						$(".group .J-item-more").removeClass("Hide");
						$(this).html("收起∧");
					}else{
						$(".group .J-item-more").addClass("Hide");
						$(this).html("更多4单团购∨");
					}
				})
			})
			
			
			$(document).ready(function  () {
				$("#body .mod-title .tuijian").click(function  () {
					$("#body .mod-title .tuijian").addClass("current");
					$("#body .mod-title .huanjing").removeClass("current");
					$("#body .mod-title .jiamu").removeClass("current");
					$("#body .mod-title .xiangce").removeClass("current");
					$("#shop-tabs .tj").removeClass("Hide");
					$("#shop-tabs .hj").addClass("Hide");
					$("#shop-tabs .jm").addClass("Hide");
					$("#shop-tabs .xc").addClass("Hide");				
				})
				$("#body .mod-title .huanjing").click(function  () {
					$("#body .mod-title .huanjing").addClass("current");
					$("#body .mod-title .tuijian").removeClass("current");
					$("#body .mod-title .jiamu").removeClass("current");
					$("#body .mod-title .xiangce").removeClass("current");
					$("#shop-tabs .hj").removeClass("Hide");
					$("#shop-tabs .tj").addClass("Hide");
					$("#shop-tabs .jm").addClass("Hide");
					$("#shop-tabs .xc").addClass("Hide");					
				})
				$("#body .mod-title .jiamu").click(function  () {
					$("#body .mod-title .jiamu").addClass("current");
					$("#body .mod-title .huanjing").removeClass("current");
					$("#body .mod-title .tuijian").removeClass("current");
					$("#body .mod-title .xiangce").removeClass("current");
					$("#shop-tabs .jm").removeClass("Hide");
					$("#shop-tabs .hj").addClass("Hide");
					$("#shop-tabs .tj").addClass("Hide");
					$("#shop-tabs .xc").addClass("Hide");			
				})
				$("#body .mod-title .xiangce").click(function  () {
					$("#body .mod-title .xiangce").addClass("current");
					$("#body .mod-title .huanjing").removeClass("current");
					$("#body .mod-title .jiamu").removeClass("current");
					$("#body .mod-title .tuijian").removeClass("current");
					$("#shop-tabs .xc").removeClass("Hide");
					$("#shop-tabs .hj").addClass("Hide");
					$("#shop-tabs .jm").addClass("Hide");
					$("#shop-tabs .tj").addClass("Hide");							
				})
				
			})
			
			
			$(document).ready(function  () {
				$("#comment ul li .content .a1 .m1a").click(function  () {
					var lang = $(this).attr("lang");
					console.log(lang);
					$(".cl"+lang).addClass("Hide");
					$(".op"+lang).removeClass("Hide");
				})
			})			
			$(document).ready(function  () {
				$("#comment ul li .content .J-info-all .m1b").click(function  () {
					$("#comment ul li .content .a1").removeClass("Hide");
					$("#comment ul li .content .b1").addClass("Hide");
				})
			})
			
			
			
			$(document).ready(function  () {
				$("#shoptabs-wrapper .mod .shop-tab-recommend .more1").click(function  () {
					var shouqi1 = $(this).html();
					if (shouqi1=="更多∨") {
						$("#shoptabs-wrapper .mod .shop-tab-recommend .recommend-name").attr("style","overflow: hidden;");
						$(this).html("收起∧");
					}else{
						$("#shoptabs-wrapper .mod .shop-tab-recommend .recommend-name").attr("style","overflow: hidden; height: 56px;");
						$(this).html("更多∨");
					}
					
				})
			})
			
			$(document).ready(function  () {
				$("#shoptabs-wrapper .mod .shop-tab-recommend .more2").click(function  () {
					var shouqi2 = $(this).html();
					if (shouqi2=="更多∨") {
						$("#shoptabs-wrapper .mod .shop-tab-recommend .clearfix").attr("style","overflow: hidden;");
						$(this).html("收起∧");
					}else{
						$("#shoptabs-wrapper .mod .shop-tab-recommend .clearfix").attr("style","overflow: hidden; height: 226px;");
						$(this).html("更多∨");
					}				
				})
			})
			
			
			$(document).ready(function  () {
				$(".nav-tabs .bottom-links-container .tabs .cur1").click(function  () {
					$(".nav-tabs .bottom-links-container .tabs .cur1").addClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur2").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur3").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur4").removeClass("cur");
					$(".nav-tabs .bottom-links-container .con .nc1").removeClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc2").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc3").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc4").addClass("Hide");
				})
				$(".nav-tabs .bottom-links-container .tabs .cur2").click(function  () {
					$(".nav-tabs .bottom-links-container .tabs .cur2").addClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur1").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur3").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur4").removeClass("cur");
					$(".nav-tabs .bottom-links-container .con .nc2").removeClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc1").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc3").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc4").addClass("Hide");
				})
				$(".nav-tabs .bottom-links-container .tabs .cur3").click(function  () {
					$(".nav-tabs .bottom-links-container .tabs .cur3").addClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur2").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur1").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur4").removeClass("cur");
					$(".nav-tabs .bottom-links-container .con .nc3").removeClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc2").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc1").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc4").addClass("Hide");
				})
				$(".nav-tabs .bottom-links-container .tabs .cur4").click(function  () {
					$(".nav-tabs .bottom-links-container .tabs .cur4").addClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur2").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur3").removeClass("cur");
					$(".nav-tabs .bottom-links-container .tabs .cur1").removeClass("cur");
					$(".nav-tabs .bottom-links-container .con .nc4").removeClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc2").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc3").addClass("Hide");
					$(".nav-tabs .bottom-links-container .con .nc1").addClass("Hide");
				})
			})
			
			$(document).ready(function  () {
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul li .img1").hover(function  () {
					$(".aside .photos-container .photo-thumb .photo-header a img").attr("src","http://p1.meituan.net/poirichness/menu_5541129_419109098.jpg%40249w_249h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20")
				})
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul li .img2").hover(function  () {
					$(".aside .photos-container .photo-thumb .photo-header a img").attr("src","http://p1.meituan.net/poirichness/menu_5541130_419110418.jpg%40249w_249h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20")
				})
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul li .img3").hover(function  () {
					$(".aside .photos-container .photo-thumb .photo-header a img").attr("src","http://p0.meituan.net/poirichness/menu_11157759_419108675.jpg%40249w_249h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20")
				})
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul li .img4").hover(function  () {
					$(".aside .photos-container .photo-thumb .photo-header a img").attr("src","http://p1.meituan.net/poirichness/menu_5541129_419109098.jpg%40249w_249h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20")
				})
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul li .img5").hover(function  () {
					$(".aside .photos-container .photo-thumb .photo-header a img").attr("src","http://p1.meituan.net/poirichness/menu_5541130_419110418.jpg%40249w_249h_1e_1c_1l%7Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20")
				})
			})
			
			
			$(document).ready(function  () {
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .next").click(function  () {
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul").attr("style","left: -232px;");
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .next").addClass("disable");
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .prev").removeClass("disable");
				})
				$(".aside .photos-container .photo-thumb .photo-thumb-btns .prev").click(function  () {
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .photo-carousel ul").attr("style","left: 0px;");
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .prev").addClass("disable");
					$(".aside .photos-container .photo-thumb .photo-thumb-btns .next").removeClass("disable");
				})
			})
			//帮贾大神做的页头
			$(document).ready(function  () {
				$(".header-container .top-nav .top-nav-container .quick-menu .J-shop-serve-trigger,.header-container .top-nav .top-nav-container .J-shop-serve-target").mousemove(function  () {
					$(".header-container .top-nav .top-nav-container .quick-menu .J-shop-serve-trigger").addClass("current");
					$(".header-container .top-nav .top-nav-container .J-shop-serve-target").removeClass("Hide");
				}).mouseout(function  () {
					$(".header-container .top-nav .top-nav-container .quick-menu .J-shop-serve-trigger").removeClass("current");
					$(".header-container .top-nav .top-nav-container .J-shop-serve-target").addClass("Hide");
				})
				
				$(".top-nav .top-nav-container .group .item1,.panel1").mouseover(function () {
				$(".top-nav .top-nav-container .group .item1,.panel1").addClass("current");
				$(".panel1").removeClass("Hide");
			}).mouseout(function () {
				$(".top-nav .top-nav-container .group .item1,.panel1").removeClass("current");
				$(".panel1").addClass("Hide");
			})
			
			$(".top-nav .top-nav-container .group .item2,.panel2").mouseover(function () {
				$(".top-nav .top-nav-container .group .item2,.panel2").addClass("current");
				$(".panel2").removeClass("Hide");
			}).mouseout(function () {
				$(".top-nav .top-nav-container .group .item2,.panel2").removeClass("current");
				$(".panel2").addClass("Hide");
			})
			
			$(".top-nav .top-nav-container .group .item3,.panel3").mouseover(function () {
				$(".top-nav .top-nav-container .group .item3,.panel3").addClass("current");
				$(".panel3").removeClass("Hide");
			}).mouseout(function () {
				$(".top-nav .top-nav-container .group .item3,.panel3").removeClass("current");
				$(".panel3").addClass("Hide");
			})
			})
			
			$(document).ready(function  () {
				$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").click(function  () {
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").toggleClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").removeClass("checked");
				})
				$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").click(function  () {
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").toggleClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").removeClass("checked");
				})
				$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").click(function  () {
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").toggleClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").removeClass("checked");
				})
				$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").click(function  () {
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").toggleClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").removeClass("checked");
				})
				$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").click(function  () {
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c5").toggleClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c2").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c3").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c4").removeClass("checked");
					$("#summaryfilter-wrapper .comment-filter-box .filter-item .c1").removeClass("checked");
				})
			})
			
			
			
			$(document).ready(function  () {
				$(".comment-filter-sort-box").click(function  () {
					if($(".sort-selection-list").is(":hidden")){
						$(".sort-selection-list").removeClass("Hide");
						$(".comment-filter-sort-box a i").addClass("up");
						$(".comment-filter-sort-box a i").removeClass("down");
					}else{
						$(".sort-selection-list").addClass("Hide");
						$(".comment-filter-sort-box a i").removeClass("up");
						$(".comment-filter-sort-box a i").addClass("down");
					}
				})
			})
			
			
			
			
			$(document).ready(function  () {
				$("#comment .comment-item .photos .pic1").click(function  () {
					var lang = $(this).attr("lang");
					console.log(lang);
//					$("da"+lang).show();
					$("trg"+lang).toggleClass("Hide");
					
				})
				
				$("#comment .comment-item .photos a:eq(1)").click(function  () {
//					$("#comment .comment-item .photos .preview-wrapper a:eq(1)").show();
					$("#comment .comment-item .photos .preview-wrapper").toggleClass("Hide");
					
				})
				
				
				
			})
			
			$(document).ready(function  () {
				$("#comment .comment-item .photos .next-btn").click(function  () {
					if($(".photos .tu").css("left","0")){
						$(".photos .tu").css("left","-714px");
						$("#comment .comment-item .photos .prev-btn").css("display","block");
					}else if($(".photos .tu").css("left","-714px")){
						$(".photos div").css("left","-978px");
						$("#comment .comment-item .photos .prev-btn").css("display","block");
					}else if($(".photos div").css("left","-978px")){
						$("#comment .comment-item .photos .next-btn").css("display","none");
						$("#comment .comment-item .photos .prev-btn").css("display","block");
					}
				})
			})
			
			$(document).ready(function  () {
				$("#comment .comment-item .photos .prev-btn").click(function  () {
					if($(".photos .tu").css("left","-978px")){
						$(".photos .tu").css("left","-714px");
						$("#comment .comment-item .photos .next-btn").css("display","block");
					}else if($(".photos .tu").css("left","-714px")){
						$(".photos div").css("left","0px");
						$("#comment .comment-item .photos .prev-btn").css("display","none");
						$("#comment .comment-item .photos .next-btn").css("display","block");
					}
				})
			})
			
			
			$(document).ready(function  () {
				$("#comment .comment-item .photos .item").click(function  () {
					$("#comment .comment-item .photos .item").css("border","2px solid #63")
				})
			})
			
			$(document).ready(function  () {
				$("#aside #aside-bottom #around-info .mod-title .tuan1").click(function  () {
					$("#aside #aside-bottom #around-info .mod-title .tuan1").addClass("current");
					$("#aside #aside-bottom #around-info .mod-title .tuan2").removeClass("current");
					$("#aside #aside-bottom #around-info .t1").removeClass("Hide");
					$("#aside #aside-bottom #around-info .t2").addClass("Hide");
				})
			})
			$(document).ready(function  () {
				$("#aside #aside-bottom #around-info .mod-title .tuan2").click(function  () {
					$("#aside #aside-bottom #around-info .mod-title .tuan2").addClass("current");
					$("#aside #aside-bottom #around-info .mod-title .tuan1").removeClass("current");
					$("#aside #aside-bottom #around-info .t2").removeClass("Hide");
					$("#aside #aside-bottom #around-info .t1").addClass("Hide");
				})
			})
		}
		return{
			init:function (){
				loadEvent();
			}
		}
	}();
	myObject.init();
})(jQuery);
